﻿import GameModuleData from "./GameModuleData";
import GameModuleS from "./GameModuleS";

export default class GameModuleC extends ModuleC<GameModuleS, GameModuleData> {

    private _isFirstEnter: boolean;
    /** 当脚本被实例后，会在第一帧更新前调用此函数 */
    protected async onStart() {
        await DataCenterC.ready()
        this._isFirstEnter = this.data.isFristEnter
        console.log("客户端模块运行")
    }

    protected onUpdate(dt: number): void {

    }

    protected onDestroy(): void {

    }
    public saveData() {
        this.server.net_setFirstEnter()
        this._isFirstEnter = false
    }
    public getData() {
        return this._isFirstEnter
    }
}